<?php

use think\facade\Route;

Route::rule('', 'app/index')
    ->append(['name' => 'cms', 'controller' => 'index', 'action' => 'index']);

Route::rule('/detail/<id>$', 'app/index')
    ->append(['name' => 'cms', 'controller' => 'index', 'action' => 'detail'])
    ->pattern(['id' => '\d+']);

Route::rule('/<alias>$', 'app/index')
    ->append(['name' => 'cms', 'controller' => 'index', 'action' => 'index']);

